package com.example.log.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * log4j2
 * <p>
 * Created by devinlee in 2021.12.15
 */
@RestController
public class LogTest {

    private static final Logger log = LoggerFactory.getLogger(LogTest.class);

    @GetMapping("/log/test")
    public void test(){
        log.info("这是一个info打印{}","1");
        log.warn("这是一个warn打印{}","2");
        log.debug("这是一个debug打印{}","3");
        log.error("这是一个error打印{}","4");
    }
}
